home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TeX 1995 July
/
TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO
/
tex-k
/
tex-k-archive
/
000039_janl@math.uio.no_Tue Mar 7 23:10:44 1995.msg
< prev
next >
Wrap
Internet Message Format
|
1995-03-08
|
2KB
Received: from ifi.uio.no by cs.umb.edu with SMTP id AA20597
(5.65c/IDA-1.4.4 for <tex-k@cs.umb.edu>); Tue, 7 Mar 1995 16:11:06 -0500
Received: from pat.uio.no (pat.uio.no [129.240.2.50]) by ifi.uio.no with SMTP (8.6.10/ifi2.4)
id <WAA08912@ifi.uio.no> for <tex-k%cs.umb.edu@ifi.uio.no> ; Tue, 7 Mar 1995 22:11:04 +0100
Received: from ulrik.uio.no by pat.uio.no with local-SMTP (PP)
id <23027-0@pat.uio.no>; Tue, 7 Mar 1995 22:10:47 +0100
Received: from mnemosyne.uio.no by gilgamesj.uio.no ;
Tue, 7 Mar 1995 22:10:46 +0100
Message-Id: <199503072110.WAA25440@gilgamesj.uio.no>
To: tex-k <tex-k@cs.umb.edu>
Reply-To: janl@math.uio.no
Subject: using texmf.cnf in shell scripts
Date: Tue, 07 Mar 1995 22:10:44 +0100
From: Nicolai Langfeldt <janl@math.uio.no>
I suddenly got a urge to use texmf.cnf values in shell scripts (in
MakeTeXPK to be exact). Not the full functionality as in kpathsea,
that's rather complexe of course. But at least it works for my
purpose, supplied her in the hopes someone find it useful. place a
'set -x' in it until you're sure you know it works the way you think
it does.
#!/bin/sh
_TEXMF_CNF=${TEXMF_CNF:-/usr/local/lib/tex}/texmf.cnf
# This function extracts a variable value from a texmf.cnf file
extract () {
eval `sed -e "/^$1[ =]/!d" -e 's/ //g' $_TEXMF_CNF`
export "$1"
}
# Demo (TEXROOT is part of my texmf.cnf):
extract TEXROOT
extract TEXMF
echo root: $TEXROOT
echo mf: $TEXMF
Nicolai